package com.baizhi.springboot.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Schedule {
    /*`id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `datestart` date DEFAULT NULL,
  `dateend` date DEFAULT NULL,
  `content` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `isopen` varchar(255) DEFAULT NULL,
  `isdept` varchar(255) DEFAULT NULL,*/
    private Integer id;
    private String name;
    private String location;
    private String type;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date datestart;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dateend;
    private String content;
    private Integer user_id;
    private String isopen;
    private String isdept;

    @Override
    public String toString() {
        return "Schedule{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", location='" + location + '\'' +
                ", type='" + type + '\'' +
                ", datestart=" + datestart +
                ", dateend=" + dateend +
                ", content='" + content + '\'' +
                ", user_id=" + user_id +
                ", isopen='" + isopen + '\'' +
                ", isdept='" + isdept + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getDatestart() {
        return datestart;
    }

    public void setDatestart(Date datestart) {
        this.datestart = datestart;
    }

    public Date getDateend() {
        return dateend;
    }

    public void setDateend(Date dateend) {
        this.dateend = dateend;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public String getIsopen() {
        return isopen;
    }

    public void setIsopen(String isopen) {
        this.isopen = isopen;
    }

    public String getIsdept() {
        return isdept;
    }

    public void setIsdept(String isdept) {
        this.isdept = isdept;
    }

    public Schedule(Integer id, String name, String location, String type, Date datestart, Date dateend, String content, Integer user_id, String isopen, String isdept) {
        this.id = id;
        this.name = name;
        this.location = location;
        this.type = type;
        this.datestart = datestart;
        this.dateend = dateend;
        this.content = content;
        this.user_id = user_id;
        this.isopen = isopen;
        this.isdept = isdept;
    }

    public Schedule() {
    }
}
